package com.symone.webcms.model;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 *   @description : MenuAction 实体类
 *   ---------------------------------
 * 	 @author Archer Chu
 *   @since 2019-01-02
 */
@Data
@Accessors(chain = true)
@TableName("sys_menu_action")
public class MenuAction extends Model<MenuAction> {

    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
	@ApiModelProperty("ID")
	@TableId(value="id", type= IdType.AUTO)
	private Long id;
    /**
     * 菜单CODE
     */
	@ApiModelProperty("菜单CODE")
	private String mcode;
    /**
     * shiro权限code
     */
	@ApiModelProperty("shiro权限code")
	@TableField("shiro_code")
	private String shiroCode;
    /**
     * 操作名称
     */
	@ApiModelProperty("操作名称")
	private String name;
    /**
     * 操作code
     */
	@ApiModelProperty("操作code")
	private String code;
    /**
     * 操作路径
     */
	@ApiModelProperty("操作路径")
	private String url;
    /**
     * 删除
     */
	@ApiModelProperty("删除")
	private Integer deleted;
	@TableField("create_time")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private Date createTime;
	@TableField("update_time")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	private Date updateTime;


	@Override
	protected Serializable pkVal() {
		return this.id;
	}
}
